package com.da.web.sys_menu.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.da.cache.MyCache;
import com.da.web.sys_menu.entity.SysMenu;
import org.apache.ibatis.annotations.CacheNamespace;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author da
 * @time 2023/12/1 下午 4:23
 */
@CacheNamespace(implementation = MyCache.class, eviction = MyCache.class)
public interface SysMenuMapper extends BaseMapper<SysMenu> {
    List<SysMenu> getMenuByUserId(@Param("userId") Long userId);
    //根据用户id查询权限

    //根据角色id查询权限
    List<SysMenu> getMenuByRoleId(@Param("roleId") Long roleId);

    //根据学生id查询权限
    List<SysMenu> getStuMenuByUserId(@Param("stuId") Long stuId);
}
